package io.renren.modules.canteens.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.canteens.dao.PersonnelDictDao;
import io.renren.modules.canteens.dto.PersonnelDictDTO;
import io.renren.modules.canteens.entity.PersonnelDictEntity;
import io.renren.modules.canteens.service.PersonnelDictService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 小食堂申请人表
 *
 * @author ÂÞÊ¤Æ½ sunlightcs@gmail.com
 * @since 1.0.0 2020-02-11
 */
@Service
public class PersonnelDictServiceImpl extends CrudServiceImpl<PersonnelDictDao, PersonnelDictEntity, PersonnelDictDTO> implements PersonnelDictService {

    @Override
    public QueryWrapper<PersonnelDictEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<PersonnelDictEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}